package exam.test13;

public class Recursive {

    public static int sumNums(int n) {
        return sumRecursive(n, 0);
    }

    public static int sumRecursive(int n, int sum) {
        if (n < 0) {
            return sum;
        }
        sum += n;
        return sumRecursive(n - 1, sum);
    }

}
